package com.bdzt.beidoubox.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;

import com.bdzt.beidoubox.R;
import com.bdzt.beidoubox.utils.T;

/**
 * 意见反馈
 */
public class IdeaActivity extends BaseActivity {
    private EditText et_context, et_ideaName, et_ideaTel, et_ideaQQ;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_idea);
        initView();
    }

    private void initView() {
        et_context = (EditText) findViewById(R.id.et_context);
        et_ideaName = (EditText) findViewById(R.id.et_ideaName);
        et_ideaTel = (EditText) findViewById(R.id.et_ideaTel);
        et_ideaQQ = (EditText) findViewById(R.id.et_ideaQQ);


        findViewById(R.id.tv_back).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                IdeaActivity.this.finish();
            }
        });

    }

    public void commit(View v) {
        String context = et_context.getText().toString();
        String name = et_ideaName.getText().toString();
        String tel = et_ideaTel.getText().toString();
        String qq = et_ideaQQ.getText().toString();

        if (TextUtils.isEmpty(context)) {
            T.showShort(this, "请先输入内容后在提交！");
            return;

        }
        T.showShort(this, context);
        IdeaActivity.this.finish();

    }
}
